<template>
  <div>
    <h2>我是子盒子</h2>
    <button @click="obj.name = 'Kexian'">修改obj</button>
    <button @click="$emit('changeTime', '2022-1-1')">修改父</button>
    <ul>
      <li>{{ msg }}</li>
      <li>{{ date }}</li>
      <li>{{ obj.name }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  props: ["date", "obj"],
  data() {
    return {
      msg: "你瞅啥!!!",
    };
  },
};
</script>

<style scoped>
li {
  list-style: none;
}
div {
  margin: 100px auto;
  width: 400px;
  height: 500px;
  border: 1px solid #000;
}
</style>